﻿* Encoding: UTF-8.
* Hierarchical regression analyses GROUP #4 = Bayley 24 months & CBCL 6 years.

*NOTE: Analyses for Attention problems were performed on dataset1 with all participants.
*Analyses for Externalising problems were performed on dataset2 excluding outlier 
(one participant had very high scores on both Bayley Cognitive Index and CBCL Externalising problems).

*Select variables without missings for centering Bayley & CBCL variables.
COUNT
  nomisBayleyCBCL = Group M3_Bayley_NL_Cognition_Index_corrected M3_Bayley_NL_Motor_Index_corrected M3_Bayley_NL_Language_Index_corrected
  M5_mdr_CBCL_AttP_T (MISSING).
FREQUENCIES
  VARIABLES=nomisBayleyCBCL
  /ORDER=  ANALYSIS.
EXECUTE.

USE ALL.
COMPUTE filter_$=(nomisBayleyCBCL eq 0).
VARIABLE LABEL filter_$ 'nomisBayleyCBCL eq 0 (FILTER)'.
VALUE LABELS filter_$  0 'Not Selected' 1 'Selected'.
FORMAT filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE .

DESCRIPTIVES
  VARIABLES=Group M3_Bayley_NL_Cognition_Index_corrected M3_Bayley_NL_Motor_Index_corrected M3_Bayley_NL_Language_Index_corrected
  M5_mdr_CBCL_AttP_T 
  /STATISTICS=MEAN STDDEV MIN MAX .
EXECUTE.

*Center variables.
COMPUTE c4M3_Bayley_NL_Cognition_Index_corrected = M3_Bayley_NL_Cognition_Index_corrected - 102.08.
EXECUTE .
COMPUTE c4M3_Bayley_NL_Motor_Index_corrected = M3_Bayley_NL_Motor_Index_corrected - 103.83.
EXECUTE .
COMPUTE c4M3_Bayley_NL_Language_Index_corrected = M3_Bayley_NL_Language_Index_corrected - 107.22.
EXECUTE .

*Compute interaction variables.
COMPUTE i4GroupM3Cognition = c4M3_Bayley_NL_Cognition_Index_corrected * Group.
EXECUTE .
COMPUTE i4GroupM3Motor = c4M3_Bayley_NL_Motor_Index_corrected * Group .
EXECUTE .
COMPUTE i4GroupM3Language = c4M3_Bayley_NL_Language_Index_corrected * Group.
EXECUTE .

*Regression analysis Bayley & CBCL Attention Problems
Step 1 (enter maternal education & group)
Step 2 (enter centered variables) 
Step 3 (enter interaction variables).
REGRESSION
  /descriptives cor
  /MISSING LISTWISE
  /STATISTICS COEFF CI(95)OUTS R ANOVA BCOV CHANGE collin tol
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT M5_mdr_CBCL_AttP_T
/METHOD=ENTER Maternal_education Group
 /METHOD=ENTER c4M3_Bayley_NL_Cognition_Index_corrected c4M3_Bayley_NL_Motor_Index_corrected c4M3_Bayley_NL_Language_Index_corrected
/METHOD=ENTER i4GroupM3Cognition i4GroupM3Motor i4GroupM3Language.

*Regression analysis Bayley & CBCL Externalising
Step 1 (enter maternal education & group)
Step 2 (enter centered variables) 
Step 3 (enter interaction variables).
REGRESSION
  /descriptives cor
  /MISSING LISTWISE
  /STATISTICS COEFF CI(95)OUTS R ANOVA BCOV CHANGE collin tol
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT M5_mdr_CBCL_Ext_Tscore
/METHOD=ENTER Maternal_education Group
 /METHOD=ENTER c4M3_Bayley_NL_Cognition_Index_corrected c4M3_Bayley_NL_Motor_Index_corrected c4M3_Bayley_NL_Language_Index_corrected
/METHOD=ENTER i4GroupM3Cognition i4GroupM3Motor i4GroupM3Language.
